<?php
/*********************************************************************************
 * SugarCRM is a customer relationship management program developed by
 * SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
$module_name = 'edanz_Feedback';
$viewdefs[$module_name]['DetailView'] = array(
'templateMeta' => array('form' => array(
	
		'hidden' => array(
			'<input type="hidden" name="descriptionLength" value="{$DESCRIPTION_LENGTH}">',
			'<input type="hidden" name="feedbackPointCount" value="{$FEEDBACK_POINT_COUNT}">',
			'<input type="hidden" name="emailCount" value="{$EMAIL_COUNT}">',
				
			'<input type="hidden" name="to_email" value="{$to_email}">',
			'<input type="hidden" name="to_cc" value="{$to_cc}">',
			'<input type="hidden" name="body" value="{$body}">',
			'<input type="hidden" name="Subject" value="{$Subject}">',
			'<input type="hidden" name="from" value="{$from}">',
			'<input type="hidden" name="fromName" value="{$fromName}">',
			'<input type="hidden" name="parent_id" value="{$parent_id}">',
			'<input type="hidden" name="parent_type" value="{$parent_type}">',
			'<input type="hidden" name="attachment" value="{$attachment}">',
			'<input type="hidden" name="attachment_name" value="{$attachment_name}">',
			'<input type="hidden" name="errorInfo" value="{$errorInfo}">',
		),
		'buttons'=>array(
			 array(
			'customCode' => '<input title="{$MOD.LBL_CONSTRUCT}" class="button" onclick="this.form.return_module.value=\'edanz_Feedback\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'FeedbackConstruction\'; this.form.module.value=\'edanz_Feedback\';" type="submit" name="Construct" value="{$MOD.LBL_CONSTRUCT}">'
			),
			array(
				'customCode' => '<input title="{$MOD.LBL_COMPOSE_FEEDBACK}" onclick="if(checkFeedbackForSending())SUGAR.quickCompose.init({$QUICK_COMPOSE_OPTIONS});" class="button" type="button" value="{$MOD.LBL_COMPOSE_FEEDBACK}">'),
			array(
				'customCode' => '<input title="{$MOD.LBL_SEND_FEEDBACK}" onclick="if(checkSendFeedbackForSending()){literal}{{/literal}this.form.return_module.value=\'edanz_Feedback\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'SendFeedback\'; this.form.module.value=\'edanz_Feedback\';{literal}}{/literal}else return false;" class="button" type="submit" value="{$MOD.LBL_SEND_FEEDBACK}">'),
			
			array(
				'customCode' => '<script>if(\'{$errorInfo}\' !=\'\')alert(\'Please enter valid email address for To and CC fields    \' + \'{$errorInfo}\');</script>'),
				
//		 'DUPLICATE',
//		 'DELETE',
			array(
				'customCode' => '<input title="{$APP.LBL_DELETE_BUTTON_TITLE}" accessKey="{$APP.LBL_DELETE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'{$RETURN_MODULE}\'; this.form.return_action.value=\'{$RETURN_ACTION}\'; this.form.return_id.value=\'{$RETURN_ID}\'; this.form.action.value=\'Delete\'; return confirm(\'{$APP.NTC_DELETE_CONFIRMATION}\');" type="submit" name="Delete" value="{$APP.LBL_DELETE_BUTTON_LABEL}">'),
		)),
		'maxColumns' => '2',
		'widths' => array(
			array('label' => '10', 'field' => '30'),
			array('label' => '10', 'field' => '30')
		),
		'includes' => array(
			array('file'=>'include/javascript/sugar_grp_overlib.js'),
			array('file'=>'modules/edanz_Feedback/DetailView.js'),
		),
	),

	'panels' =>array (

  array (
    'feedback_number',
    'r2jobnumber_c',
  ),
	array (
		'name',
		'cc_c',
	),
	array (
		'quality_rating' => array('name'=>'quality_rating','label' => '{$MOD.LBL_QUALITY_RATING}{sugar_help text=$MOD.LBL_QUALITY_RATING_TEXT}'),
		array('label' => 'R2 Job', 'customCode'=>'<a href="{$fields.r2joburl_c.value}">{$fields.r2jobname_c.value}</a>'),
	),
	array (
		'related_editor_name',
			array('label' => 'Attachment:', 'customCode'=>'<a target="_blank" href="index.php?entryPoint=download&id={$fields.attachment_c.value}&type=Notes">{$fields.attachment_name_c.value}</a>'),
	),
	array (
		'deliverable_name',
	),
  array (
    'description',
  ),

  array (
	array (
      'name' => 'date_entered',
      'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
      'label' => 'LBL_DATE_ENTERED',
    ),
    array (
      'name' => 'date_modified',
      'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
      'label' => 'LBL_DATE_MODIFIED',
    ),
  ),

)
);
?>
